<template>
	<view class="col-root">
		<view class="col-title">{{title}}</view>
		<view class="cols">
			<view class="cols-item" v-for="(item,index) in entryData" :key="index"
				@click="onEntryClick(item)">
				<image :src="item.imgSrc" class="item-img"></image>
				<text class="item-title">{{item.title}}</text>
			</view>
		</view>
		<view class="col-cutoff"></view>
	</view>
</template>

<script>
	export default {
		props: {
			title: {
				type: String
			},

			entryData: {
				type: Array
			}
		},
		
		methods:{
			onEntryClick(e) {
				this.$emit("onEntryClick" ,e);
			}
		}
	}
</script>

<style lang="scss" scoped>
	.col-root {
		margin-top: 0upx;
		
	}
	
	.col-title {
		padding: 6upx;
		margin: 40upx 0upx 20upx 30upx;
		font-size: 32upx;
		color: #000000;
	}

	.cols {
		display: flex;
		flex-direction: row;
		padding-left: 20upx;
		// flex-wrap: wrap;
		// justify-content: space-around;

		.cols-item {
			display: flex;
			flex-direction: column;
			flex-wrap: wrap;
			justify-content: space-around;
			padding: 30upx;
			align-items: center;
			
			.item-img {
				width: 70upx;
				height: 70upx;
			}
			
			.item-title {
				width: 120upx;
				font-size: 20upx;
				color: #003300;
			}
		}
	}
	
	.col-cutoff {
		width: 100%;
		height: 20upx;
		background-color: #F5F5F5;
	}
</style>
